# -*- coding: utf-8 -*-
"""
@author:xieyabin
@file: runsina_asks.py
@time: 2019/03/05
"""
import sys
import os
import time

# 获取当前文件所在目录
current_dir = os.path.dirname(os.path.abspath(__file__))  # 当前文件的绝对路径，然后再找他的父级目录
sys.path.append(current_dir)  # 将当前路径加入到path中

ret = os.system('scrapy crawl sina_asks')
t = time.strftime('%Y-%m-%d',time.localtime(time.time()))
# ret2 = os.system('scrapy crawl sina_asks -a t="%s"' % t)
#
print(ret)
# print(ret2)
# if ret2 == 0:
#     time.sleep(30)
#     ret2 = os.system('scrapy crawl sina_asks -a t="%s"' % t)
# else:
#     time.sleep(30)
#     ret2 = os.system('scrapy crawl sina_asks -a t="%s"' % t)